document.addEventListener("DOMContentLoaded", function () {
  var favoriteIcons = document.querySelectorAll(".favorite-icon");
  favoriteIcons.forEach(function (icon) {
    icon.addEventListener("click", function () {
      if (icon.classList.contains("filled")) {
        icon.classList.remove("filled");
        icon.innerHTML = "&#9825;"; // Empty heart
      } else {
        icon.classList.add("filled");
        icon.innerHTML = "&#10084;"; // Filled black heart
      }
      console.log(icon.innerHTML)
    });
  });
});
